/**
 * @author Kristian Mandrup
 * @date June 10, 2009
 * @version 0.1
 * 
 * m3gen :: configuration
 * 
 * - Define settings for event handling (and possbile other configurations of the engine in the future!)
 */

m3gen.pathFinderSettings = {
	methods: {
		'jpath': m3gen.pathFunctions.findObjByJPath,
		'xpath': m3gen.pathFunctions.findObjByXPath
	}	
}

m3gen.eventSettings = {
	all: {
		generator: "info",
		parser: "info",		
		branch: "info",
		setNode: "info",
		id: "info",
		select: "none"		
	},
	branchOnly: {
		generator: "error",
		parser: "error",		
		branch: "info",
		setNode: "error",
		id: "error",
		select: "none"	
	},
	parserOnly: {
		generator: "error",
		parser: "info",		
		branch: "error",
		setNode: "error",
		id: "error",
		select: "none"	
	},
	parserAndBranchOnly: {
		generator: "error",
		parser: "info",		
		branch: "info",
		setNode: "error",
		id: "error",
		select: "none"	
	},	
	warnOnly: {
		generator: "warning",
		parser: "warning",		
		branch: "warning",
		setNode: "warning",
		id: "warning",
		select: "warning"	
	},		
	errorOnly: {
		generator: "error",
		parser: "error",		
		branch: "error",
		setNode: "error",
		id: "error",
		select: "error"	
	},	
	none: {
		generator: "none",
		parser: "none",		
		branch: "none",
		setNode: "none",
		id: "none",
		select: "none"	
	}
}

m3gen.eventList = [];

m3gen.log = function(message, params) {
	console.log(message);
	m3gen.eventList.push(message);	
}

// set default event lv settings
m3gen.eventController.settings = m3gen.eventSettings.parserAndBranchOnly;

